cmake_minimum_required(VERSION 2.8)

project(database)

include_directories(${SQLITE3_PATH}/include)
link_directories(${SQLITE3_PATH}/lib)

set(CM_DATABASE_FILES
        CMDatabaseBase.cpp
        CMDatabaseBase.h
        CMDatabaseSqlite.cpp
        CMDatabaseSqlite.h
        CMDatabaseProxy.cpp
        CMDatabaseProxy.h)

foreach(arg ${COMMON_FILES} ${COMMON_CONFIG_EX_FILES})
    list(APPEND DB_NEED_COMMON_FILES "${CMAKE_CURRENT_SOURCE_DIR}/../${arg}")
endforeach()

add_executable(cm_database_test
        cm_database_test.cpp
        ${DB_NEED_COMMON_FILES}
        ${CM_DATABASE_FILES}
		)

target_link_libraries(cm_database_test
        sqlite3
		pthread
		)
